package com.dg.gaming.serverloadbalancer;

import com.dg.dgrmi.handler.*;
import com.dg.dgrmi.net.*;
import com.dg.gaming.communication.*;


/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2009</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class LoadBalancer {

    public static void main(String[] args) {
        DGRMIServer server = new DGRMIServer();

        CallHandler callHandler = new CallHandler();
        try {
            Communicator comun = new Communicator(100);
            server.addServerListener(comun);
            callHandler.registerGlobal(ICommunicator.class,
                                       comun);
            callHandler.exportObject(IServerHendler.class, comun);
            int thePortIWantToBind = 4455;

            server.bind(thePortIWantToBind, callHandler);

        } catch (Exception ex) {
        }
    }

}
